In a distributed database management system (DBMS) having multiple computing nodes, a greedy algorithm can be used in determining node locations for placement of operators that perform operations on tables (or optionally on other database objects), for example as part of responding to queries or other database transactions or operations (e.g. joins, aggregations, etc.)
A greedy algorithm follows a problem solving heuristic of making a locally optimal choice at each stage with the hope of finding a global optimum. In other words, the algorithm chooses an option from among the immediately available options that appears to provide the most benefit based on the current situation. A greedy strategy does not in general produce an optimal solution in all cases. However, such an approach can yield locally optimal solutions that approximate a global optimal solution in a reasonable time.